<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page language="java" import="com.xteam.ecsystem.utils.AppConfig"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
			
	// 获取等级图标路径
	String gradeIconPath = AppConfig.getGradeImagePath();
	// 获取图片实际根目录
	String realpath = AppConfig.getRealPath();
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<title>会员管理-会员列表</title>
		<jsp:include page="../../include/base.jsp"></jsp:include>
		<jsp:include page="../../include/common.jsp"></jsp:include>
		<jsp:include page="../../include/baseManage.jsp"></jsp:include>
		
		<script type="text/javascript">
			var __gradeIconPath = "<%=gradeIconPath %>";
			var __realpath = '<%=realpath%>';
		</script>
	</head>
	<body>
		<div class="mini-toolbar"
			style="border: 0; font-size: 12px; padding-left: 6px;">
			<!-- 操作面板 -->
			<div class="operatePanel">
				<input class="mini-button" text="添加会员" iconCls="icon-addnew"
					plain="false" onclick="MemberFormHandlerc.addMember" visible="false" id="member_list_add" />
				<input class="mini-button" text="编辑会员" iconCls="icon-edit"
					plain="false" onclick="MemberFormHandlerc.editMember" visible="false" id="member_list_edit" />
				<input class="mini-button" text="激活会员" iconCls="icon-filter"
					plain="false" onclick="MemberFormHandlerc.activateMember" visible="false" id="member_list_activation" />
				<input class="mini-button" text="冻结会员" iconCls="icon-lock"
					plain="false" onclick="MemberFormHandlerc.freezeMember"  visible="false" id="member_list_lock" />
				<input class="mini-button" text="删除会员" iconCls="icon-remove"
					plain="false" onclick="MemberFormHandlerc.delMember" visible="false" id="member_list_del" />
				<input class="mini-button" text="展开查询" iconCls="icon-btn-expand"
					plain="false" onclick="MemberFormHandlerc.queryShow" visible="false" id="member_list_query" />
				<input class="mini-button" text="刷新" iconCls="icon-btn-refresh"
					plain="false" onclick="MemberHandler.afresh"  visible="false" id="member_list_refresh"/>
			</div>
			<!-- 查询面板 -->
			<div id="queryMemberDiv" class="queryPanel">
				<form id="memberQueryForm">
					<label class="queryPanelLbl">
						昵称：
					</label>
					<input class="mini-textbox" id="bmbNick" name="bmbNick" />
					<label class="queryPanelLbl">
						手机号码：
					</label>
					<input class="mini-textbox" id="bgttel" name="bgttel" />
					<label class="queryPanelLbl">
						会员状态：
					</label>
					<input class="mini-combobox" id="bmbState" name="bmbState"
						textField="text" valueField="id" />
					<input class="mini-button" text="查询" iconCls="icon-btn-search"
						plain="false" onclick="MemberHandler.doQuery" />
				</form>
			</div>
		</div>
		<div class="mini-fit" id="memberPanel">
			<div id="memberGrid" class="mini-datagrid" fitColumns="true"
				style="width: 100%; height: 100%;" multiSelect="true" pageSize="20"
				borderStyle="border-bottom:0;border-left:0;border-right:0;"
				virtualScroll="true" idField="bmbEmail"
				url="<%=path%>/getMemberList.do">
				<div property="columns">
					<div type="checkcolumn"></div>
					<div field="bmbNick" name="bmbNick" width="100" headerAlign="center">
						昵称
					</div>
					<div field="bmbGrade" name="bmbGrade" width="60" headerAlign="center" align="center" allowSort="true">
						会员等级
					</div>
					<div field="bgrIcon" name="bgrIcon" width="60" headerAlign="center" align="center" renderer="rderBgrIcon">
						等级图标
					</div>
					<div field="bmbEmail" name="bmbEmail" width="140" headerAlign="center">
						电子邮箱
					</div>
					<div field="bmbMobile" name="bmbMobile" width="100" headerAlign="center" align="center">
						手机号码
					</div>
					<div field="bmbIntegral" name="bmbIntegral" width="80" headerAlign="center" align="center">
						会员积分
					</div>
					<div field="bmbBuysnew" name="bmbBuysnew" width="100" headerAlign="center" align="center">
						新增消费额(元)
					</div>
					<div field="bmbBuystotal" name="bmbBuystotal" width="100" headerAlign="center" align="center">
						累积消费额(元)
					</div>
					<div field="bmbUpgradetime" name="bmbUpgradetime" width="140" headerAlign="center" align="center" renderer="rderUpGradeTime">
						升级时间
					</div>
					<div field="bmbLast" name="bmbLast" width="140" headerAlign="center" align="center" renderer="rderBmbLast">
						最近登录
					</div>
					<div field="bmbState" name="bmbState" width="100%" headerAlign="center" align="center" renderer="rderBmbState">
						会员状态
					</div>
				</div>
			</div>
		</div>
	</body>
	<script src="handler/MemberHandler.js" type="text/javascript"></script>
	<script src="handler/MemberFormHandler.js" type="text/javascript"></script>
</html>
